package com.wushi.lenovo.asia5b.app_di.profile.presenter;

import com.mvp.base.BasePresenter;
import com.wushi.lenovo.asia5b.app_di.profile.mvpview.ChangeAddressActivityView;
import com.wushi.lenovo.asia5b.app_http.ApiService;
import com.wushi.lenovo.asia5b.app_model.other.UserInfo;

import javax.inject.Inject;


/**
 * Created by zhangyuncai on 2019/1/25.
 */
public class ChangeAddressActivityPresenter extends BasePresenter<ChangeAddressActivityView> {

    ApiService apiService;

    @Inject
    public ChangeAddressActivityPresenter(ApiService apiService) {
        this.apiService = apiService;
    }
    public void getAddresses() {
        baseSubscribe(apiService.getAddresses(UserInfo.getMemberId())
                , addressResModelResultModel -> {
                    getView().getAddressesResult(addressResModelResultModel);
                });
    }
}